<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <load href="__PUBLIC__/js/jquery-2.1.4.min.js" />
    <load href="__PUBLIC__/js/jquery.animate-colors-min.js" />
    <script src="__PUBLIC__/list/js/base.min.js"></script>
    <script src="__PUBLIC__/list/js/xmsg_ti.js"></script>
    <load href="__PUBLIC__/css/xiaomi.css"/>


    <load href="__PUBLIC__/css/base.css" />
    <load href="__PUBLIC__/css/reset.css" />
    <!-- <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/bootstrap/css/bootstrap.min.css" media="screen"> -->

    <load href="__PUBLIC__/list/css/base.min.css" />
    <load href="__PUBLIC__/list/css/list.min.css" />
   <!--  <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/bootstrap/css/bootstrap.min.css" media="screen"> -->
    <script type="text/javascript" src="__PUBLIC__/js/jquery-2.1.4.min.js"></script>

        <style>/* 定义模态对话框外面的覆盖层样式 */
          .labelbox {

            border: 1px solid #ccc;
        }
        #modal-overlay {
             visibility: hidden;    
             position: absolute;   /* 使用绝对定位或固定定位  */
             left: 0px;    
             top: 0px;
             width:100%;
             height:100%;
             text-align:center;
             z-index: 1000;
             background-color:rgba(255,255,255,0.5); 
             /*opacity: 0.5;   /* 背景半透明 */*/
        }
        /* 模态框样式 */
        .labelbox {
    width:  250px ;
    height: 22px;
    line-height: 22px;
    padding: 13px 16px 13px 14px;
    display: block;
    margin-bottom: 14px;
}
        .modal-data{
             width:600px;
             margin: 100px auto;
             background-color: white;
             border:1px solid #000;
             padding:15px;
             text-align:center;
             opacity: 1;   /* 背景半透明 */

        }
        #reguser{
            width: 120px;
            height:30px;
            margin-bottom: 14px;
            /*border: 1px solid #ccc;*/
        }
        #regu{
            width: 120px;
            height:30px;
            margin-bottom: 14px;

            /*border: 1px solid #ccc;*/
        }
       
.eeee{
    width:  150px ;
    height: 20px;
    line-height: 20px;
}
        </style>

    <load href="__PUBLIC__/list/css/base.min.css" />
    <load href="__PUBLIC__/list/css/list.min.css" />

</head>
<body>
 <div id="modal-overlay"> 
    <div class="modal-data">        
                <div class="login-main">
                    <div class="lgheader">
                        <div class="header_tit">
                            <em id="custom_display_1" class="milogo">
                  <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"><rect width="50" height="50" style="fill:#ef5b00"></rect><rect x="11.25" y="15" width="5" height="20" style="fill:#FFFFFF"></rect><rect x="11.25" y="15" width="12.5" height="5" style="fill:#FFFFFF"></rect><rect x="26.25" y="22.5" width="5" height="12.5" style="fill:#FFFFFF"></rect><rect x="33.75" y="15" width="5" height="20" style="fill:#FFFFFF"></rect><circle cx="23.75" cy="22.5" r="7.5" fill="#FFFFFF"></circle><rect x="16.25" y="20" width="7.5" height="15" style="fill:#ef5b00"></rect><rect x="16.25" y="22.5" width="10" height="12.5" style="fill:#ef5b00"></rect><circle cx="23.75" cy="22.5" r="2.5" fill="#ef5b00"></circle><rect x="18.75" y="22.5" width="5" height="12.5" style="fill:#FFFFFF"></rect></svg>
                </em>
                        <h4 class="header_tit_txt" id="login-title">小米帐号登录</h4>

                        <div class=" site_info"></div>
                        </div>
                    </div>
                    
                    <div class="login_area">
                            
                            <form action="<{:U("Home/Index/index")}>" method="post">
                            <table>
                                <tr>
                                <td><input class="labelbox item_account"   name="user" id="username" placeholder="邮箱/手机号码/小米帐号" type="text"></td><td>&nbsp;&nbsp;&nbsp;&nbsp;<div id="reguser"></div></td>
                                </tr>
                                <tr>
                                <td><input class="labelbox item_account" placeholder="密码"  name="pwd" id="pwd" type="password"></td><td>&nbsp;&nbsp;&nbsp;&nbsp;<div id="regu"></td>
                                </tr>
                            </table>

                                <div class="btns_bg">
                      <input class="btnadpt btn_orange" id="login-button" value="立即登录" type="submit">
                      <span id="custom_display_8" class="sns-default-container sns_default_container" style="display: none;">
                      </span>
                    </div>
                    
                    <fieldset class="oth_type_tit">
                        <legend align="center" class="oth_type_txt">其他方式登录</legend>
                      </fieldset>

                        <div class="oth_type_links">
                            
                        </div> 

                            </form>

                    </div>


                </div>

        <p>点击<a onclick="overlay()" href="">这里</a>关闭</p>
    </div>
</div>
    <div class="head_box">
         <div id="head_wrap">
             <div id="head_nav">
                 <a class="head_nav_a">大米网</a>
                 <span>|</span>
                 <a class="head_nav_a">MIUI</a>
                 <span>|</span>
                 <a class="head_nav_a">米聊</a>
                 <span>|</span>
                 <a class="head_nav_a">游戏</a>
                 <span>|</span>
                 <a class="head_nav_a">多看阅读</a>
                 <span>|</span>
                 <a class="head_nav_a">云服务</a>
                 <span>|</span>
                 <a class="head_nav_a">大米移动版</a>
                 <span>|</span>
                 <a class="head_nav_a">问题反馈</a>
                 <span>|</span>
                 <a class="head_nav_a" id="Select_Region_but">Select Region</a>
             </div>
             <div id="head_right">
                 <div id="head_landing">
                 <if condition="empty($_SESSION['suser_id'])">
                 <a class="head_nav_a" onclick="overlay()">登陆</a>
                     <span>|</span>
                     <a class="head_nav_a"  href="<{:U("Home/Login/regist1")}>">注册</a>
                     <else />
                        <a href=""><{$_SESSION['sname']}></a>
                     </if>
                     

                 </div>
                 <div id="head_car">
                     <a class="head_car_text">购物车（0）</a>
                     <div id="car_content" style="height: 0px;width:0px ;background-color: #edffc6;z-index: 999">
                         <a class="car_text"></a>
                     </div>
                 </div>
             </div>
         </div>
     </div>
     <div id="main_head_box">
         <div id="menu_wrap">
             <div id="menu_logo">
                 <img src="__PUBLIC__/img/xiaomi_logo.png" alt="">
             </div>
             <div id="menu_nav">
                 <ul>
                     <li class="menu_li" control="xiaomiphone">大米手机</li>
                     <li class="menu_li" control="hongmiphone">红米</li>
                     <li class="menu_li" control="pingban">平板</li>
                     <li class="menu_li" control="tv">电视&nbsp;&nbsp;盒子</li>
                     <li class="menu_li" control="luyou">路由器</li>
                     <li class="menu_li" control="yingjian">智能硬件</li>
                     <li><a>服务</a></li>
                     <li><a>社区</a></li>
                 </ul>
             </div>
             <div id="find_wrap">
                 <div id="find_bar">
                     <input type="text" id="find_input">
                 </div>
                 <div id="find_but">GO</div>
             </div>
         </div>
<!-- {:U(Home/Login/username)} -->
         <script>function overlay(){
   var e1 = document.getElementById('modal-overlay');           
   e1.style.visibility = (e1.style.visibility == "visible")? "hidden" : "visible";
}
</script>
<script> 
 var username="";
$('#username').blur(function(){
    username=$('#username').val();
    $.ajax({
   type: "POST",
   url: "<{:U('Home/Login/username')}>",
   data: {"username":username},
   success: function(msg){
     // alert( "Data Saved: " + msg );
     // $('#reguser').css('color','green').html(msg);

      if(msg){
     // alert( "Data Saved: " + msg );

             $('#reguser').css('color','green').html('√用户名正确');
                            
            }else{
            $('#reguser').css('color','red').html('×用户名不正确');
}

     // $("form").find("input[id=#username]").val(msg); 
   }
})
})






$('#pwd').blur(function(){

 var pwd=$('#pwd').val();
    $.ajax({
        type:"POST",
        url:"<{:U('Home/Login/pwd')}>",
        data:{"pwd":pwd,"username":username},

        success:function(msg){
     // $('#regu').css('color','red').html("glyphicon glyphicon-ok"+msg);
if(msg){
  $('#regu').css('color','green').html('√密码正确');
                            
                        }else{
                            $('#regu').css('color','red').html('×密码不正确');
             // alert("Data saved: "+ msg )
        }
    }
    })
})
  
</script>